import { ui } from "../../ui/layaMaxUI";
import SoundMgr from "../../core_wq/sound/SoundMgr";
import SoundType from "../../core_wq/sound/SoundType";



export default class SignView extends ui.moduleView.sign.SignViewUI {


    _isInit = false;


    onEnable() {
        if (this.closeBtn && this._isInit !== true) {
            this._isInit = true;
            this.closeBtn.on(Laya.Event.CLICK, this, this.clickClose);
            this.receiveBtn.on(Laya.Event.CLICK, this, this.ClickReceive);
            this.runShowAnim();
        }
    }

    runShowAnim() {
        SoundMgr.Ins.playEffect(SoundType.SHOW_DIALOG);
        this.root.scale(0, 0);
        Laya.Tween.to(this.root, { scaleX: 1, scaleY: 1 }, 700, Laya.Ease.sineOut);
    }


    clickClose() {
        SoundMgr.Ins.playEffect(SoundType.CLICK);
        this.removeSelf();
    }

    ClickReceive() {

    }




}